//
//  ReadCell.m
//  NeteaseNewsLY
//
//  Created by dllo on 16/1/26.
//  Copyright © 2016年 www.lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "ReadCell.h"

@implementation ReadCell
- (void)dealloc
{
    [_bigKuang release];
    [_title release];
    [_lineLabel release];
    [_img release];
    [_source release];
    [super dealloc];
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.bigKuang = [[UIImageView alloc] init];
        _bigKuang.image = [UIImage imageNamed:@"white"];
        [self.contentView addSubview:_bigKuang];
        // 加边框
        //        _bigKuang.layer.borderWidth = 1;
        //        _bigKuang.layer.borderColor = [UIColor grayColor].CGColor;
        //       // 圆角
        //        _bigKuang.layer.cornerRadius  = 3;
        //        _bigKuang.clipsToBounds = YES;
        //        _bigKuang.layer.cornerRadius = 5;
        //        _bigKuang.clipsToBounds = YES;
        [_bigKuang release];
        
        self.title = [[UILabel alloc] init];
        _title.numberOfLines = 0;
        [self.bigKuang addSubview:_title];
        [_title release];
        
        self.lineLabel = [[UILabel alloc] init];
        [self.bigKuang addSubview:_lineLabel];
        [_lineLabel release];
        
        self.img = [[UIImageView alloc] init];
        [self.bigKuang addSubview:_img];
        [_img release];
        
        self.source = [[UILabel alloc] init];
        [self.bigKuang addSubview:_source];
        [_source release];
        
    }
    return self;
    
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    
    _bigKuang.frame = CGRectMake(WIDTH * 10, HEIGHT * 5, WIDTH * 355, HEIGHT * 140);
    
    _img.frame = CGRectMake(WIDTH * 10, HEIGHT * 5, WIDTH * 110, HEIGHT * 80);
    
    _title.frame = CGRectMake(WIDTH * 140, HEIGHT * 5, WIDTH * 200, HEIGHT * 60);
    
    _lineLabel.frame = CGRectMake(WIDTH * 10, HEIGHT * 95, WIDTH * 335, HEIGHT * 1);
    _lineLabel.backgroundColor = [UIColor grayColor];
    _lineLabel.alpha = 0.2;
    
    _source.frame = CGRectMake(WIDTH * 10, HEIGHT * 105, WIDTH * 100, HEIGHT * 25);
    _source.font = [UIFont systemFontOfSize:10];
    _source.textColor = [UIColor grayColor];
        
}

@end
